<!--拌和站---拌合站设置-->
<!--
 * @Author: 卡卡 1071780426@qq.com
 * @Date: 2022-12-06 13:13:25
 * @LastEditors: 贺楠 1071780426@qq.com
 * @LastEditTime: 2024-08-08 10:21:42
 * @FilePath: \backstage - 副本\src\views\aa.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="department" id="mixingPlant">
    <!-- 左侧部门管理 -->
    <div class="structureTree" v-if="treelength">
      <div class="structureTree_title">
        <div>组织机构</div>
        <div></div>
      </div>
      <tree
        :treeData="treeData"
        :checkData="checkData"
        name="pitchManage_treeCheck"
        nodeKey="fCompanyid"
        @getTreeInfo="handleNodeClick"
        :defaultProps="defaultProps"
      >
      </tree>
    </div>
    <!-- 右侧 -->
    <div class="department_right">
      <!-- 机构名称 -->
      <el-breadcrumb :title="showName"></el-breadcrumb>
      <!-- 顶部导航栏 -->
      <div class="mechanism_nav">
        <!-- 左侧 -->
        <div class="mechanism_nav_left"></div>
        <!-- 顶部按钮 -->
        <div class="print" style="justify-content: flex-end">
          <!-- v-if="nature == '建设单位'" -->
          <el-button
            type="primary"
            v-if="yj_save"
            icon="el-icon-check"
            size="small"
            @click="yj_saveForm(1)"
            >保存
          </el-button>
        </div>
      </div>

      <!-- 表格 -->
      <div class="text_table editTableAlarm">
        <tableData
          :config="table_config"
          :currentRow="false"
          :dataList="tableData"
          :loading="listLoading"
          @inputValue="inputValue"
          statusType="1"
        />
        <!-- <el-collapse v-model="activeNames">
                    <el-collapse-item disabled name="0">
                        <template slot="title">
                            <div style="padding: 0 10px;">
                                <img style="vertical-align: middle;" src="@/assets/img/Supervision/com_flg.png" alt="">
                                <span style="margin-left: 8px;"> 拌和温度超标设置</span>
                            </div>
                        </template>
                        <div style="margin-top: 3px;">
                            <el-table :data="temperatureStandard" style="width: 100%">

                                <el-table-column prop="fHhltype" width="170" label="沥青混合料" align="center">
                                    <template slot-scope="scope">
                                        <div class="inputminute">
                                            <el-input v-model="scope.row.fHhltype"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="fPitchnum" width="170" label="沥青标号/改性沥青品种" align="center">
                                    <template slot-scope="scope">
                                        <div class="inputminute">
                                            <el-input v-model="scope.row.fPitchnum"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="fTemup" width="170" label="正常范围（温度)" align="center">
                                    <template slot-scope="scope">
                                        <div class="temperatureScope">
                                            <el-input v-model="scope.row.fTemup"></el-input>
                                            <div class="character"> ≤ t ≤ </div>
                                            <el-input v-model="scope.row.fTemdown"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>

                                <el-table-column align="right">
                                    <template slot="header">
                                        <div class="customTableCenter">
                                            <el-button class="plain" size="mini" type="plain">初级(温度)</el-button>
                                        </div>
                                    </template>
                                    <template slot-scope="scope">
                                        <div class="inputminute">
                                            <el-input v-model="scope.row.fTemwarn1"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column align="right">
                                    <template slot="header">
                                        <div class="customTableCenter">
                                            <el-button class="warning" size="mini" type="warning">中级(温度)</el-button>
                                        </div>
                                    </template>
                                    <template slot-scope="scope">
                                        <div class="inputminute">
                                            <el-input v-model="scope.row.fTemwarn2"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column align="right">
                                    <template slot="header">
                                        <div class="customTableCenter">
                                            <el-button class="danger" size="mini" type="danger">高级(温度)</el-button>
                                        </div>
                                    </template>
                                    <template slot-scope="scope">
                                        <div class="inputminute">
                                            <el-input v-model="scope.row.fTemwarn3"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="fTimeup" width="170" label="正常范围（时间)" align="center">
                                    <template slot-scope="scope">
                                        <div class="temperatureScope">
                                            <el-input v-model="scope.row.fTimeup"></el-input>
                                            <div class="character"> ≤ s ≤ </div>
                                            <el-input v-model="scope.row.fTimedown"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column align="right">
                                    <template slot="header">
                                        <div class="customTableCenter">
                                            <el-button class="plain" size="mini" type="primary">初级(时间)</el-button>
                                        </div>
                                    </template>
                                    <template slot-scope="scope">
                                        <div class="inputminute">
                                            <el-input v-model="scope.row.fTimewarn1"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column align="right">
                                    <template slot="header">
                                        <div class="customTableCenter">
                                            <el-button class="warning" size="mini" type="warning">中级(时间)</el-button>
                                        </div>
                                    </template>
                                    <template slot-scope="scope">
                                        <div class="inputminute">
                                            <el-input v-model="scope.row.fTimewarn2"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>
                                <el-table-column align="right">
                                    <template slot="header">
                                        <div class="customTableCenter">
                                            <el-button class="danger" size="mini" type="danger">高级(时间)</el-button>
                                        </div>
                                    </template>
                                    <template slot-scope="scope">
                                        <div class="inputminute">
                                            <el-input v-model="scope.row.fTimewarn3"></el-input>
                                        </div>
                                    </template>
                                </el-table-column>

                                <el-table-column align="right">
                                    <template slot="header">
                                        <div class="customTable">
                                            <el-button type="primary" icon="el-icon-circle-plus-outline"
                                                @click="addUnqualifiedInfo"></el-button>
                                        </div>
                                    </template>
                                    <template slot-scope="scope">
                                        <div class="customTable" style="padding-right: 37px">
                                            <el-button type="danger" icon="el-icon-delete" @click="deleteUnqualifiedInfo(scope.$index, scope.row)
                                                " circle></el-button>
                                        </div>
                                    </template>
                                </el-table-column>
                            </el-table>

                        </div>
                        <div class="saveBtn" v-if="temperatureStandard.length != 0">
                            <el-button type="primary" size="small" @click="yj_saveForm(0)">
                                保存</el-button>
                        </div>
                    </el-collapse-item>
                    <el-collapse-item disabled name="1">
                        <template slot="title">
                            <div style="padding: 0 10px;">
                                <img style="vertical-align: middle;" src="@/assets/img/Supervision/com_flg.png" alt="">
                                <span style="margin-left: 8px;"> 超标参数设置</span>
                            </div>
                        </template>
                        <div style="height:130px;margin-top: 3px;">
                            <tableData :config="table_config" :currentRow="false" :dataList="tableData"
                                :loading="listLoading" @inputValue="inputValue" statusType="1" />

                        </div>
                        <div class="saveBtn">
                            <el-button type="primary" size="small" @click="yj_saveForm(1)">
                                保存</el-button>
                        </div>
                    </el-collapse-item>
                </el-collapse> -->
      </div>
    </div>
  </div>
</template>
<script>
// import tree from "@/components/public/common-trees";
import tree from "@/components/stationProductionPage/pitchManage/tree"; //左侧机构树

import TableData from "@/components/stationProductionPage/pitchManage/common/el-tables";
import elBreadcrumb from "@/components/public/el-breadcrumb.vue";
// import publicForm from "@/components/public/el-form.vue"
import {
  getUserCompanyTreeList, //树状图接口
  // saveStationWarn,// 查询-拌合站预警信息-新增接口
  // getStationWarnByCompanyId,// 查询-拌合站预警信息-详情接口

  saveAsphaltStationWarn, // 新增-沥青拌合站预警信息-温度时间新增接口
  getAsphaltTemWarnByCompanyId, // 查询-沥青拌合站预警信息-温度时间详情接口
  saveAsphaltMaterialWarn, // 新增-沥青拌合站预警信息-超标参数新增接口
  getAsphaltMaterialWarnByCompanyId, //查询-沥青拌合站预警信息-超标参数详情接口
} from "@/api/request.js";
import { statusType } from "@/utils/config"; //配置项
export default {
  name: "lqAlarmParameterSetting",
  data() {
    return {
      name: "lqAlarmParameterSetting", //按钮配置页面代号
      nature: null,
      yj_save: null,
      formData: {}, //新增编辑向后台传递对象
      activeNames: ["0", "1"],
      // 拌和站列表配置项
      table_config: {
        classCell: true,
        thead: [
          {
            label: "",
            prop: "name",
            minWidth: "30px",
            filter: true,
            btn: true,
            align: "center",
            colorName: "",
            callback: (rowData) => {
              let data = statusType[rowData.name];
              if (data) {
                return data.label;
              }
            },
            specialClass: (rowData) => {
              let data = statusType[rowData.name];
              if (data) {
                return data.className;
              }
            },
          },
          {
            label: "油石比(%)",
            prop: "fOilstonewarn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "温度(C°)",
            prop: "fTempreaturewarn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "拌合时长(s)",
            prop: "fMixdurationwarn",
            minWidth: "40px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "0.075mm",
            prop: "fSieve1warn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "<=2.36mm",
            prop: "fSieve2warn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: ">=4.75mm",
            prop: "fSieve3warn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "沥青(%)",
            prop: "fPitchwarn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },

          {
            label: "矿粉(%)",
            prop: "fMineralwarn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "1#仓碎石(%)",
            prop: "fStone1warn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "2#仓碎石(%)",
            prop: "fStone2warn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "3#仓碎石(%)",
            prop: "fStone3warn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "4#仓碎石(%)",
            prop: "fStone4warn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "5#仓碎石(%)",
            prop: "fStone5warn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "6#仓碎石(%)",
            prop: "fStone6warn",
            minWidth: "30px",
            type: "number",
            disabled: false, //是否禁用
            edit: true,
            align: "center",
          },
          {
            label: "闭合流程",
            prop: "fExamine",
            minWidth: "45px",
            type: "option",
            disabled: false, //是否禁用
            option: true,
            align: "center",
            options: [
              {
                value: "无需闭合",
                label: "无需闭合",
              },
              {
                value: "一级流程",
                label: "一级流程",
              },
              {
                value: "二级流程",
                label: "二级流程",
              },
              {
                value: "三级流程",
                label: "三级流程",
              },
            ],
          },
          {
            label: "是否启用多级预警",
            prop: "fIsuse",
            minWidth: "45px",
            type: "radio",
            disabled: false, //是否禁用
            radio: true,
            align: "center",
          },
        ],
        isCheckBox: false,
        isIndex: false,
        isOperation: true,
      },

      temperatureStandard: [],
      search: "",
      tableData: [], //表格列表数据列表
      detailData: {}, //拌合站预警信息-详情
      highlightBd: true, //左侧机构树停留背景色
      treelength: false, //左侧树显示隐藏
      checked: true, //查看下级
      showName: "未选择公司",
      dialogHeight: "330px", //新增编辑弹框高度
      fId: null, //点击当前列表数据fId
      listLoading: false, //列表数据加载loading
      loadingEditDialog: false, //弹框loading
      dialogEditVisible: false, //新增弹框是否显示
      // 列表给后端传参
      getList: {
        companyId: "", // 施工标段id
      },

      companyTree: "", //所有数据
      treeData: [], //左侧树状图数据

      // 左侧机构树
      defaultProps: {
        children: "children",
        label: "fShortname",
      },
      userInfo: {}, //登录用户
      checkData: [],
      treeText: {
        //树状图参数
        companyId: null,
        userId: null,
        text: null,
      },
    };
  },
  components: {
    tree, //左侧组织机构数
    TableData, //主页面列表
    elBreadcrumb, //面包屑
    // publicForm,//弹框表格
  },
  mounted() {
    this.userInfo = JSON.parse(sessionStorage.getItem("yjSmart-userInfo"));
    if (JSON.parse(sessionStorage.getItem("yjSmart-pitchManage_treeCheck"))) {
      var id = JSON.parse(sessionStorage.getItem("yjSmart-pitchManage_treeCheck"));
      this.checkData = [id.fCompanyid];
    }
    this.getTree();
    this.btnRole(this.name);
  },
  methods: {
    btnRole(name) {
      // 按钮权限
      var btnList = [];
      var ModuleList = JSON.parse(sessionStorage.getItem("yjSmart-ModuleList"));
      if (ModuleList.length > 0) {
        ModuleList.map((item) => {
          if (item.fEncode == name) {
            btnList = item.modulebuttonList;
          }
        });
        var btnStr = [];
        btnList.map((item) => {
          btnStr.push(item.fEncode);
        });
        this.yj_save = btnStr.includes("yj_save");
      } else {
        this.yj_save = true;
      }
    },
    // 点击列表当前行，获取当前信息
    rowChange(row) {
      this.fId = row.fId;
    },
    // 左侧树结构
    getTree() {
      this.treeText = {
        companyId: this.userInfo.companyId,
        userId: this.userInfo.userId,
        text: "3", // 0其他  1 砼拌合站 2水稳 3沥青
      };
      getUserCompanyTreeList(this.treeText)
        .then((res) => {
          if (res.errcode == 0) {
            var companyTree = res.data.userCompanyTreeList;
            // this.treeData = this.tranListToTreeData(companyTree);//将接口返回数据二次处理，形成树状图结构
            this.treeData = this.commonJs.tranListToTreeData(companyTree);

            if (this.treeData[0].children == undefined) {
              this.treelength = false; //左侧组织机构是否显示
            } else {
              this.treelength = true;
            }
            if (this.checkData[0]) {
              this.showName = JSON.parse(
                sessionStorage.getItem("yjSmart-pitchManage_treeCheck")
              ).fShortname;
              this.getList.companyId = this.checkData[0];
            } else {
              this.checkData[0] = this.treeData[0].fCompanyid;

              this.showName = this.treeData[0].fShortname; //当前点击组织机构名称
              this.getList.companyId = this.treeData[0].fCompanyid; //当前点击组织机构ID
            }
            this.yj_searchForm(this.getList, 0); // 调用主页面列表接口
            this.yj_searchForm(this.getList, 1); // 调用主页面列表接口
          } else {
            this.$message.error(res.msg);
            return false;
          }
        })
        .catch(() => {
          return false;
        });
    },

    // 点击左侧机构树
    handleNodeClick(data) {
      this.showName = data.fShortname; //顶部显示机构名
      this.getList.companyId = data.fCompanyid;
      this.nature = data.fNature;
      this.yj_searchForm(this.getList, 0);
      this.yj_searchForm(this.getList, 1);
    },

    // 获取列表数据
    yj_searchForm(data, status) {
      this.listLoading = true;
      // 查询-沥青拌合站预警信息-温度时间详情接口
      if (status == 0) {
        getAsphaltTemWarnByCompanyId(data)
          .then((res) => {
            if (res.errcode == 0) {
              console.log(res);
              var that = this;
              that.listLoading = false;
              this.temperatureStandard = res.data.warntemperature;
            } else {
              this.$message.error(res.msg);
              return false;
            }
          })
          .catch((error) => {
            console.log(error);
          });
      } else if (status == 1) {
        // 查询-沥青拌合站预警信息-超标参数详情接口
        getAsphaltMaterialWarnByCompanyId(data)
          .then((res) => {
            if (res.errcode == 0) {
           
              var that = this;
              that.listLoading = false;

              var list = res.data.warnmaterial;
              this.formData = list;
              this.detailData = res.data.warnmaterial;

              this.tableData = [
                {
                  name: "1",
                  fOilstonewarn: list.fOilstonewarn1, //油石比 低预警
                  fTempreaturewarn: list.fTempreaturewarn1, //温度 低预警
                  fMixdurationwarn: list.fMixdurationwarn1, //时长 低预警
                  fSieve1warn: list.fSieve1warn1, // 0.075mm 级配低预警
                  fSieve2warn: list.fSieve2warn1, // <=2.36mm 级配低预警
                  fSieve3warn: list.fSieve3warn1, // >=4.75mm 级配低预警
                  fPitchwarn: list.fPitchwarn1, //沥青 低预警
                  fMineralwarn: list.fMineralwarn1, //矿粉 低预警
                  fStone1warn: list.fStone1warn1, //碎石1 低预警
                  fStone2warn: list.fStone2warn1, //碎石2 低预警
                  fStone3warn: list.fStone3warn1, //碎石3 低预警
                  fStone4warn: list.fStone4warn1, //碎石4 低预警
                  fStone5warn: list.fStone5warn1, //碎石5 低预警
                  fStone6warn: list.fStone6warn1, //碎石6 低预警
                  fExamine: list.fExamine1, //闭合流程
                  fIsuse: res.data.warnmaterial.fIsuse, //1 是 0 否  是否启用
                },
                {
                  name: "2",
                  fOilstonewarn: list.fOilstonewarn2, //油石比 低预警
                  fTempreaturewarn: list.fTempreaturewarn2, //温度 低预警
                  fMixdurationwarn: list.fMixdurationwarn2, //时长 低预警
                  fSieve1warn: list.fSieve1warn2, // 0.075mm 级配中预警
                  fSieve2warn: list.fSieve2warn2, // <=2.36mm 级配中预警
                  fSieve3warn: list.fSieve3warn2, // >=4.75mm 级配中预警
                  fPitchwarn: list.fPitchwarn2, //沥青 低预警
                  fMineralwarn: list.fMineralwarn2, //矿粉 低预警
                  fStone1warn: list.fStone1warn2, //碎石1 低预警
                  fStone2warn: list.fStone2warn2, //碎石2 低预警
                  fStone3warn: list.fStone3warn2, //碎石3 低预警
                  fStone4warn: list.fStone4warn2, //碎石4 低预警
                  fStone5warn: list.fStone5warn2, //碎石5 低预警
                  fStone6warn: list.fStone6warn2, //碎石6 低预警
                  fExamine: list.fExamine2, //闭合流程
                  fIsuse: list.fIsuse, //1 是 0 否  是否启用
                },
                {
                  name: "3",
                  fOilstonewarn: list.fOilstonewarn3, //油石比 低预警
                  fTempreaturewarn: list.fTempreaturewarn3, //温度 低预警
                  fMixdurationwarn: list.fMixdurationwarn3, //时长 低预警
                  fSieve1warn: list.fSieve1warn3, // 0.075mm 级配高预警
                  fSieve2warn: list.fSieve2warn3, // <=2.36mm 级配高预警
                  fSieve3warn: list.fSieve3warn3, // >=4.75mm 级配高预警
                  fPitchwarn: list.fPitchwarn3, //沥青 低预警
                  fMineralwarn: list.fMineralwarn3, //矿粉 低预警
                  fStone1warn: list.fStone1warn3, //碎石1 低预警
                  fStone2warn: list.fStone2warn3, //碎石2 低预警
                  fStone3warn: list.fStone3warn3, //碎石3 低预警
                  fStone4warn: list.fStone4warn3, //碎石4 低预警
                  fStone5warn: list.fStone5warn3, //碎石5 低预警
                  fStone6warn: list.fStone6warn3, //碎石6 低预警
                  fExamine: list.fExamine3, //闭合流程
                  fIsuse: list.fIsuse, //1 是 0 否  是否启用
                },
              ];
            } else {
              this.$message.error(res.msg);
              return false;
            }
          })
          .catch((error) => {
            console.log(error);
          });
      }
    },
    // 超标参数设置
    // yj_exceedStandard(data) {

    // },
    deleteUnqualifiedInfo(index) {
      this.temperatureStandard.splice(index, 1);
    },
    // 添加按照一段时间内不合格的盘数提醒
    addUnqualifiedInfo() {
      this.temperatureStandard.push({
       

        fId: "", // 主键id
        fCompanyid: this.getList.companyId, // 施工单位id
        fCompanyname: this.showName, //施工单位
        fHhltype: "", // 沥青混合料
        fPitchnum: "", // 沥青标号
        fTemup: "", // 温度上限
        fTemdown: "", // 温度下限
        fTemwarn1: "", // 温度 低预警
        fTemwarn2: "", // 温度 中预警
        fTemwarn3: "", // 温度 高预警
        fTimeup: "", // 时间上限
        fTimedown: "", // 时间下限
        fTimewarn1: "", // 时间 低预警
        fTimewarn2: "", // 时间 中预警
        fTimewarn3: "", // 时间 高预警
      });
    },
    // 保存接口
    yj_saveForm(status) {
      if (status == 0) {
        saveAsphaltStationWarn({
          companyId: this.getList.companyId,
          warntemperature: this.temperatureStandard,
        }).then((res) => {
          if (res.errcode == 0) {
            this.yj_searchForm(this.getList, 0);
            this.$message.success("拌和温度超标保存成功");
          } else {
            this.$message.error(res.msg);
            console.log("接口报错");
          }
        });
      } else if (status == 1) {
      
        saveAsphaltMaterialWarn(this.formData).then((res) => {
          if (res.errcode == 0) {
            this.yj_searchForm(this.getList, 1);
            this.$message.success("报警参数设置保存成功");
          } else {
            this.$message.error("报警参数设置-新增", res.msg);
            console.log("接口报错");
          }
        });
       
      }
    },

    // 关闭新增编辑弹框
    resetForm() {
      this.dialogEditVisible = false;
    },

    // 骨料详情
    inputValue(val, table) {
      this.formData = {
        fId: this.detailData.fId, // 主键id
        fCompanyid: this.getList.companyId, // 施工单位id
        fCompanyname: this.showName, //施工单位
        fOilstonewarn1: table[0].fOilstonewarn, // 油石比 低预警
        fOilstonewarn2: table[1].fOilstonewarn, // 油石比 中预警
        fOilstonewarn3: table[2].fOilstonewarn, // 油石比 高预警

        fTempreaturewarn1: table[0].fTempreaturewarn, //温度 低预警
        fTempreaturewarn2: table[1].fTempreaturewarn, //温度 中预警
        fTempreaturewarn3: table[2].fTempreaturewarn, //温度 高预警

        fMixdurationwarn1: table[0].fMixdurationwarn, //时长 低预警
        fMixdurationwarn2: table[1].fMixdurationwarn, //时长 中预警
        fMixdurationwarn3: table[2].fMixdurationwarn, //时长 高预警

        fSieve2warn1: table[0].fSieve2warn, // <=2.36mm 级配初预警
        fSieve2warn2: table[1].fSieve2warn, // <=2.36mm 级配中预警
        fSieve2warn3: table[2].fSieve2warn, // <=2.36mm 级配高预警

        fSieve3warn1: table[0].fSieve3warn, // >=4.75mm 级配初预警
        fSieve3warn2: table[1].fSieve3warn, //  >=4.75mm 级配中预警
        fSieve3warn3: table[2].fSieve3warn, //  >=4.75mm 级配高预警

        fSieve1warn1: table[0].fSieve1warn, // 0.075mm 级配低预警
        fSieve1warn2: table[1].fSieve1warn, // 0.075mm 级配中预警
        fSieve1warn3: table[2].fSieve1warn, // 0.075mm 级配高预警

        fPitchwarn1: table[0].fPitchwarn, // 沥青 低预警
        fPitchwarn2: table[1].fPitchwarn, // 沥青 中预警
        fPitchwarn3: table[2].fPitchwarn, // 沥青 高预警

        fMineralwarn1: table[0].fMineralwarn, // 矿粉 低预警
        fMineralwarn2: table[1].fMineralwarn, // 矿粉 中预警
        fMineralwarn3: table[2].fMineralwarn, // 矿粉 高预警

        fStone1warn1: table[0].fStone1warn, // 碎石1 低预警
        fStone1warn2: table[1].fStone1warn, // 碎石1 中预警
        fStone1warn3: table[2].fStone1warn, // 碎石1 高预警

        fStone2warn1: table[0].fStone2warn, // 碎石2 低预警
        fStone2warn2: table[1].fStone2warn, // 碎石2 中预警
        fStone2warn3: table[2].fStone2warn, // 碎石2 高预警

        fStone3warn1: table[0].fStone3warn, // 碎石3 低预警
        fStone3warn2: table[1].fStone3warn, // 碎石3 中预警
        fStone3warn3: table[2].fStone3warn, // 碎石3 高预警

        fStone4warn1: table[0].fStone4warn, // 碎石4 低预警
        fStone4warn2: table[1].fStone4warn, // 碎石4 中预警
        fStone4warn3: table[2].fStone4warn, // 碎石4 高预警

        fStone5warn1: table[0].fStone5warn, // 碎石5 低预警
        fStone5warn2: table[1].fStone5warn, // 碎石5 中预警
        fStone5warn3: table[2].fStone5warn, // 碎石5 高预警

        fStone6warn1: table[0].fStone6warn, // 碎石6 低预警
        fStone6warn2: table[1].fStone6warn, // 碎石6 中预警
        fStone6warn3: table[2].fStone6warn, // 碎石6 高预警
        fExamine1: table[0].fExamine, // 流程 低预警
        fExamine2: table[1].fExamine, // 流程 中预警
        fExamine3: table[2].fExamine, // 流程 高预警
        fIsuse: table[0].fIsuse, // 1 是 0 否  是否启用
      };
    },
    // classCell(row, column, rowIndex, columnIndex) {
    //     console.log(row, column, rowIndex, columnIndex);
    //     if (rowIndex == 0 && columnIndex == 0) {

    //         return 'blueClass';
    //     } else if (rowIndex == 1 && columnIndex == 0) {

    //         return 'orangeClass';
    //     } else if (rowIndex == 2 && columnIndex == 0) {

    //         return 'redClass';
    //     }
    // },
    // 多选方法
    selectionChange() {},
    // 排序方法
    sortChange() {},
    // 点击设备编码
    openDialog(row) {
      this.fId = row.F_Id;
      this.editText(this.fId);
    },
  },
};
</script>
  
<style scoped>
.saveBtn {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 15px;
  padding: 7px 40px 0px;
}

.temperatureScope {
  display: flex;
  /* width: 150px; */
}

.character {
  margin: 0 8px;
}

.customTable {
  display: flex;
  height: 100%;
  justify-content: flex-end;
  align-items: center;
  padding-right: 30px;
}

.customTable /deep/.cell {
  height: 100%;
  display: flex;
  align-items: center;
}

.customTable /deep/.el-button {
  width: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* .customTableCenter /deep/.cell {
    height: 100%;
    display: flex;
    align-items: center;
} */

/* .customTableCenter /deep/.el-button {

    display: flex;
    justify-content: center;
    align-items: center;
} */
</style>